home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / trubasic / rolldemos / demos / sci / vfunc.tru < prev   
Encoding:
Text File  |  1994-08-02  |  325 b   |  16 lines

  1. !
  2. !  VFUNC.  Graph a vector function.
  3. !
  4. LIBRARY "sgfunc.trc"
  5. call tw_wset_title(0,"vfunc")
  6. CALL SetTitle("Vector Function")
  7. CALL SetCanvas("cyan")
  8. CALL FvaGraph(-3,5,-3,5,1,"white white magenta")
  9. get point x,y
  10. END
  11.  
  12. SUB Fv(x,y,mag,ang)
  13.     LET mag = Sqr(x*x+y*y)
  14.     IF mag=0 then LET ang=0 else LET ang = -Angle(x,y)
  15. END SUB
  16.